const main = require('../main/main');
let fee = main;
describe('taxi fee', function () {
    
    it('距离小于2公里',function(){
        let expected = 6;
        let result = fee(1,0);
        expect(result).toEqual(expected);
    });

    it('距离大于2公里，小于8公里',function(){
        let expected = 10;
        let result = fee(7,0);
        expect(result).toEqual(expected);
    });

    it('距离大于8公里',function(){
        let expected = 18;
        let result = fee(14,0);
        expect(result).toEqual(expected);
    });

    it('四舍五入收费',function(){
        let expected = 8;
        let result = fee(5,0);
        expect(result).toEqual(expected);
    });

    it('停车等待',function(){
        let expected = 10;
        let result = fee(5,5);
        expect(result).toEqual(expected);
    });
});
